package com.yyf.blogapi.service;

import com.yyf.blogapi.po.SysUser;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yyf.blogapi.vo.LoginParam;
import org.springframework.scheduling.annotation.Async;
import org.springframework.transaction.annotation.Transactional;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author yyf
 * @since 2021-08-16
 */
public interface ISysUserService extends IService<SysUser> {

    SysUser getUserByAccountAndPassword(String account, String password);

    @Transactional
    String register(LoginParam loginParam);

    SysUser getUserByAccount(String account);

    SysUser checkToken(String token);

    @Async("taskExecutor")
    void updateLastLogin(SysUser user);
}
